//
//  UIImage+Method.m
//  XYSfxyxuSwift
//
//  Created by 许洋 on 2018/2/27.
//  Copyright © 2018年 许洋. All rights reserved.
//

#import "UIImage+Method.h"
#import <objc/runtime.h>
@implementation UIImage (Method)
+ (UIImage *)imageWithName:(NSString *)name{
    BOOL iOS7 = [[UIDevice currentDevice].systemVersion floatValue] >= 7.0;
    UIImage *image = nil;
    if (iOS7) {
        image = [UIImage imageWithName:@"高圆圆"];
    }
    
    if (image == nil) {
        image = [UIImage imageWithName:name];
    }
    return image;

}
+ (void)load{
//    Method otherMethod = class_getClassMethod(self, @selector(imageWithName:));
//    Method originMethod = class_getClassMethod(self, @selector(imageNamed:));
//    method_exchangeImplementations(originMethod, otherMethod);
}
@end
